package com.bears.god.sup.service;

import java.util.List;

import com.bears.god.sup.dao.DAOFactory;
import com.bears.god.sup.model.Dept;

public class DeptServiceImp implements IdeptService {

	@Override
	public List<Dept> findByAll(int num1, int num2) throws Exception {
		return DAOFactory.getDeptDAO().findByAll(num1, num2);
	}

	@Override
	public List<Dept> findByAll() throws Exception {
		return DAOFactory.getDeptDAO().findByAll();
	}

	@Override
	public void save(Dept dept) throws Exception {
		DAOFactory.getDeptDAO().save(dept);
	}

	@Override
	public void update(Dept dept) throws Exception {
		DAOFactory.getDeptDAO().update(dept);
	}

	@Override
	public Dept findById(int id) throws Exception {
		return DAOFactory.getDeptDAO().findById(id);
	}
}
